package com.cy.pj.category.dao;

import com.cy.pj.category.pojo.Category;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Cx
 * @stage secondStageOfWeb
 * @creat 2020-11-11 16:57
 */
@Mapper
public interface CategoryDao {

    @Select("select * from tb_category")
    List<Category> findCategory();

    @Insert("insert into tb_category (id,name,parentId,remark,createdTime) values(#{id},#{name},#{parentId},#{remark},now())")
    int insertCategory(Category category);

}
